package com.aishua.andpaydemo.fragment.shopmarketfagment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.aishua.andpaydemo.ImageloaderHelper;
import com.aishua.andpaydemo.R;
import com.aishua.andpaydemo.activity.FujinShopAcitivity;
import com.aishua.andpaydemo.fragment.BaseFragment;

/**
 * Created by aishua on 2018/5/17.
 */

public class FujianShangjiaFragment extends BaseFragment {

    private ImageView fujinyouhui;
    private ImageView img_meishibanner;
    private ImageView img_bingjiling;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {

        View view = View.inflate(getContext(), R.layout.fragment_fujinshagnjia,null);
        initTitleView( view);
        initView(view);
        initViewData();
        return view;

    }


    private void initTitleView(View view) {


    }
    private void initView(View view) {

        img_meishibanner = view.findViewById(R.id.img_meishibanner);
        img_bingjiling = view.findViewById(R.id.img_bingjiling);
        fujinyouhui = view.findViewById(R.id.img_fujin);
        ImageloaderHelper.dispalyImage(getContext(),R.drawable.meishibanner,img_meishibanner);
        ImageloaderHelper.dispalyImage(getContext(),R.drawable.bingjiling,img_bingjiling);
        ImageloaderHelper.dispalyImage(getContext(),R.drawable.fujinyouhui,fujinyouhui);

    }

    private void initViewData() {


        fujinyouhui.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent(getContext(), FujinShopAcitivity.class);
                startActivity(intent);
            }
        });
    }
}
